﻿<%@ Page Language="C#" AutoEventWireup="True" EnableViewState="false"  CodeBehind="AdminRoleManage.aspx.cs" Inherits="eBlog.Web.Admin.AdminRoleManage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="x-ua-compatible" content="ie=7" />
<link href="resources/css/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
	function checkrole(name, max){
	    var all = document.getElementById(name);
	    for(var i = 1; i <= max; i++){
	        if(all.checked){
	            var child = document.getElementById(name + i);
	            child.checked = true;
	        }else{
	            var child = document.getElementById(name + i);
	            child.checked = false;
	        }
	    }
	}
</script>
</head>

<body>


<script src="resources/scripts/admincp.js" type="text/javascript"></script>
<script src="resources/scripts/common.js" type="text/javascript"></script>
<div id="append_parent"></div>
<div class="container" id="cpcontainer">
<script type="text/JavaScript">parent.document.title = '管理中心 - 角色组 ';if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='全局&nbsp;&raquo;&nbsp;管理 角色组';</script>

<div class="floattop">
<div class="itemtitle">
	<h3>部门、角色组管理中心</h3>
</div>
</div>

<div class="floattopempty"></div>

<form name="cpform" id="cpform" runat="server">
<input type="hidden" name="anchor" value="" />
<input type="hidden" ID="Referrer" runat="server" />


<asp:Panel ID="edit" runat="server" Visible="false" EnableViewState="false">
<table class="tb tb2 nobdb" id="base">
	<tr><td colspan="2" class="td27">ID:</td></tr>
	<tr class="noborder"><td class="vtop rowform"><asp:label id="lblID" runat="server"></asp:label></td>
	<td class="vtop tips2"></td>
	</tr>
	<tr><td colspan="2" class="td27">部门/角色组名称:</td></tr>
	<tr class="noborder"><td class="vtop rowform"><asp:TextBox ID="txtRoleName" runat="server" class="txt"></asp:TextBox></td>
	<td class="vtop tips2"></td>
	</tr>
	<tr><td colspan="2" class="td27">超级角色组:</td></tr>
	<tr class="noborder"><td class="vtop rowform">
        <asp:RadioButton ID="isSuper1" GroupName="isSuper" Text="是"  class="radio" runat="server"   />
        <asp:RadioButton ID="isSuper2" GroupName="isSuper" Text="否" class="radio" runat="server" Checked="true" />
	</td>
	<td class="vtop tips2">超级组拥有全部架构权限，至高无上。</td>
	</tr>
	
	<tbody id="RightUrlsForm"> <!--普通角色组定义url表单-->
		
	<tr><td colspan="2" class="td27">自定义权限URL:</td></tr>
	<tr class="noborder"><td class="vtop rowform"><asp:TextBox ID="txtCustomUrl" runat="server" class="txt" TextMode="MultiLine" Rows="10" ondblclick="textareasize(this, 1)" onkeyup="textareasize(this, 0)" ></asp:TextBox></td>
	<td class="vtop tips2">自定义的权限URL，直接输入被访url及路径，支持参数url，每个一行，回车区分</td>
	</tr>
	
		
	</tbody><!--普通角色组定义URLS结束-->
	
</table>


<table class="tb tb2 noborder fixpadding">
<tr><th colspan="15" class="partition">系统权限</th></tr>
<tr class="header"><th><b>权限类别</b></th>
<th><input class="checkbox" type="checkbox" name="chkall1" onclick="checkAll('prefix', this.form, 'Llist', 'chkall1')" id="chkall1" /><label for="chkall1"> 列表浏览</label></th>
<th><input class="checkbox" type="checkbox" name="chkall2" onclick="checkAll('prefix', this.form, 'Lshow', 'chkall2')" id="chkall2" /><label for="chkall2"> 查看详细</label></th>
<th><input class="checkbox" type="checkbox" name="chkall3" onclick="checkAll('prefix', this.form, 'Ladd', 'chkall3')" id="chkall3" /><label for="chkall3"> 数据添加</label></th>
<th><input class="checkbox" type="checkbox" name="chkall4" onclick="checkAll('prefix', this.form, 'Ledit', 'chkall4')" id="chkall4" /><label for="chkall4"> 数据编辑</label></th>
<th><input class="checkbox" type="checkbox" name="chkall5" onclick="checkAll('prefix', this.form, 'Ldel', 'chkall5')" id="chkall5" /><label for="chkall5"> 数据删除</label></th>
<th><input class="checkbox" type="checkbox" name="chkall6" onclick="checkAll('prefix', this.form, 'Lcheck', 'chkall6')" id="chkall6" /><label for="chkall6"> 数据审核</label></th>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv1" onclick="checkAll('value', this.form, 1, 'chkallv1')" />管理员管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="1"  value="AdminManage.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="1"  value="AdminManage.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="1"  value="AdminManage.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="1"  value="AdminManage.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="1"  value="AdminManage.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="1"  value="AdminManage.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv2" onclick="checkAll('value', this.form, 2, 'chkallv2')" />角色组管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="2"     value="adminrole.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="2"  value="adminrole.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="2"   value="adminrole.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="2"    value="adminrole.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="2"    value="adminrole.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="2"  value="adminrole.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv3" onclick="checkAll('value', this.form, 3, 'chkallv3')" />分类管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="3"    value="category.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="3"  value="category.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="3" name="Ladd[]"   value="category.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="3" name="Ledit[]"   value="category.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="3" name="Ldel[]"    value="category.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="3" name="Lcheck[]" value="category.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv4" onclick="checkAll('value', this.form, 4, 'chkallv4')" />问答管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="4" name="Llist[]"    value="ask.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="4" name="Lshow[]" value="ask.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="4" name="Ladd[]"   value="ask.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="4" name="Ledit[]"   value="ask.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="4" name="Ldel[]"    value="ask.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="4" name="Lcheck[]" value="ask.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv5" onclick="checkAll('value', this.form, 5, 'chkallv5')" />商家管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="5" name="Llist[]"    value="partner.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="5" name="Lshow[]" value="partner.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="5" name="Ladd[]"   value="partner.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="5" name="Ledit[]"   value="partner.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="5" name="Ldel[]"    value="partner.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="5" name="Lcheck[]" value="partner.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv6" onclick="checkAll('value', this.form, 6, 'chkallv6')" />团项目管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="6" name="Llist[]"    value="team.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="6" name="Lshow[]" value="team.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="6" name="Ladd[]"   value="team.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="6" name="Ledit[]"   value="team.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="6" name="Ldel[]"    value="team.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="6" name="Lcheck[]" value="team.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv7" onclick="checkAll('value', this.form, 7, 'chkallv7')" />用户管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="7" name="Llist[]"    value="user.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="7" name="Lshow[]" value="user.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="7" name="Ladd[]"   value="user.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="7" name="Ledit[]"   value="user.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="7" name="Ldel[]"    value="user.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="7" name="Lcheck[]" value="user.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv8" onclick="checkAll('value', this.form, 8, 'chkallv8')" />OA商家管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="8" name="Llist[]"    value="oapartner.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="8" name="Lshow[]" value="oapartner.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="8" name="Ladd[]"   value="oapartner.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="8" name="Ledit[]"   value="oapartner.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="8" name="Ldel[]"    value="oapartner.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="8" name="Lcheck[]" value="oapartner.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv9" onclick="checkAll('value', this.form, 9, 'chkallv9')" />OA团购管理</label></td>
	<td><input class="checkbox" type="checkbox" chkvalue="9" name="Llist[]"    value="oateam.aspx"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="9" name="Lshow[]" value="oateam.aspx?action=show" runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="9" name="Ladd[]"   value="oateam.aspx?action=add"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="9" name="Ledit[]"   value="oateam.aspx?action=edit"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="9" name="Ldel[]"    value="oateam.aspx?action=del"  runat="server"/></td>
	<td><input class="checkbox" type="checkbox" chkvalue="9" name="Lcheck[]" value="oateam.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv10" onclick="checkAll('value', this.form, 10, 'chkallv10')" />优惠券管理</label></td>
	<td><input id="Checkbox1" class="checkbox" type="checkbox" chkvalue="10" name="Llist[]"    value="coupon.aspx"  runat="server"/></td>
	<td><input id="Checkbox2" class="checkbox" type="checkbox" chkvalue="10" name="Lshow[]" value="coupon.aspx?action=show" runat="server"/></td>
	<td><input id="Checkbox3" class="checkbox" type="checkbox" chkvalue="10" name="Ladd[]"   value="coupon.aspx?action=add"  runat="server"/></td>
	<td><input id="Checkbox4" class="checkbox" type="checkbox" chkvalue="10" name="Ledit[]"   value="coupon.aspx?action=edit"  runat="server"/></td>
	<td><input id="Checkbox5" class="checkbox" type="checkbox" chkvalue="10" name="Ldel[]"    value="coupon.aspx?action=del"  runat="server"/></td>
	<td><input id="Checkbox6" class="checkbox" type="checkbox" chkvalue="10" name="Lcheck[]" value="coupon.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv11" onclick="checkAll('value', this.form, 11, 'chkallv11')" />财务管理</label></td>
	<td><input id="Checkbox7" class="checkbox" type="checkbox" chkvalue="11" name="Llist[]"    value="pay.aspx"  runat="server"/></td>
	<td><input id="Checkbox8" class="checkbox" type="checkbox" chkvalue="11" name="Lshow[]" value="pay.aspx?action=show" runat="server"/></td>
	<td><input id="Checkbox9" class="checkbox" type="checkbox" chkvalue="11" name="Ladd[]"   value="pay.aspx?action=add"  runat="server"/></td>
	<td><input id="Checkbox10" class="checkbox" type="checkbox" chkvalue="11" name="Ledit[]"   value="pay.aspx?action=edit"  runat="server"/></td>
	<td><input id="Checkbox11" class="checkbox" type="checkbox" chkvalue="11" name="Ldel[]"    value="pay.aspx?action=del"  runat="server"/></td>
	<td><input id="Checkbox12" class="checkbox" type="checkbox" chkvalue="11" name="Lcheck[]" value="pay.aspx?action=check"  runat="server"/></td>
</tr>

<tr class="hover"><td><label><input class="checkbox" title="全选" type="checkbox" name="chkallv12" onclick="checkAll('value', this.form, 12, 'chkallv12')" />订单管理</label></td>
	<td><input id="Checkbox13" class="checkbox" type="checkbox" chkvalue="12" name="Llist[]"    value="order.aspx"  runat="server"/></td>
	<td><input id="Checkbox14" class="checkbox" type="checkbox" chkvalue="12" name="Lshow[]" value="order.aspx?action=show" runat="server"/></td>
	<td><input id="Checkbox15" class="checkbox" type="checkbox" chkvalue="12" name="Ladd[]"   value="order.aspx?action=add"  runat="server"/></td>
	<td><input id="Checkbox16" class="checkbox" type="checkbox" chkvalue="12" name="Ledit[]"   value="order.aspx?action=edit"  runat="server"/></td>
	<td><input id="Checkbox17" class="checkbox" type="checkbox" chkvalue="12" name="Ldel[]"    value="order.aspx?action=del"  runat="server"/></td>
	<td><input id="Checkbox18" class="checkbox" type="checkbox" chkvalue="12" name="Lcheck[]" value="order.aspx?action=check"  runat="server"/></td>
</tr>


</table>



<div class="fixsel"><asp:Button ID="btnSave" runat="server" Text="保 存" class="btn" OnClick="btnSave_Click" ></asp:Button><span style="margin-left:20px"> </span><input type="button" value="返 回" id="goback" class="btn" onclick="javascript:history.go(-1)" /></div>
</asp:Panel>

<%--列表容器--%>
<asp:Panel ID="list" runat="server" Visible="false" EnableViewState="false">
<table class="tb tb2 ">
<tr><th colspan="15" class="partition">共<strong> <%=ListCount %> </strong>个角色组信息<a href="" class="act lightlink normal"></a></th></tr>

<tr class="header">
	<th>ID</th>
	<th>角色组名称</th>
	<th>超级角色组</th>
	<th>管理选项</th>
</tr>

<asp:Repeater ID="RPLIST" runat="server">
<itemtemplate>
<tr class="hover">
	<td class="td25"><input type="checkbox" name="checkAllID" value="<%#Eval("ID") %>" class="checkbox"></td>
	<td><%#Eval("RoleName") %></td>
	<td><%#Eval("isSuper").ToString()=="True"? "是":"否" %></td>

	<td><a href="?action=edit&id=<%#Eval("ID") %>" class="act">编辑</a><a href="?action=del&id=<%#Eval("ID") %>" class="act" onclick="return confirm('数据删除不可恢复,确认删除吗？');" >删除</a></td>
<%--<a href="?action=show&id=<%#Eval("ID") %>" class="act">查看</a>--%>
</tr>
</itemtemplate>
</asp:Repeater>
<tr><td colspan="15"><div class="cuspages right"><div class="pg"><asp:Literal ID="PageNav" runat="server"></asp:Literal></div></div>
<div class="fixsel"><input type="checkbox" name="chkall" onclick="checkAll('prefix', this.form, 'checkAllID')" class="checkbox">删? &nbsp;
<input type="button" class="btn" id="checkAllDel" name="checkAllDel" value="提交" onclick="return confirm('确认选择批量删除吗？');"/></div>
</td></tr>
</table>
</asp:Panel>



<input type="hidden" ID="ErrCodeStr" runat="server" />
<script type="text/javascript">formShowErr("ErrCodeStr");</script>
</form>
</div>
</body>
</html>
